﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace AbpLearningDemo.DataModels
{
    public class Company : AuditedEntity<Guid>, IPassivable, ISoftDelete
    {
        /// <summary>
        /// Maximum length of the <see cref="Name"/> property.
        /// </summary>
        public const int MaxNameLength = 32;

        /// <summary>
        /// Maximum length of the <see cref="Phone"/> property.
        /// </summary>
        public const int MaxPhoneLength = 32;

        /// <summary>
        /// Maximum length of the <see cref="Address"/> property.
        /// </summary>
        public const int MaxAddressLength = 128;

        /// <summary>
        /// Maximum length of the <see cref="Introduction"/> property.
        /// </summary>
        public const int MaxIntroductionLength = 512;

        /// <summary>
        /// 企业名称
        /// </summary>
        [Required]
        [MaxLength(MaxNameLength)]
        public virtual string Name { get; set; }

        /// <summary>
        /// 企业电话
        /// </summary>
        [MaxLength(MaxPhoneLength)]
        public virtual string Phone { get; set; }

        /// <summary>
        /// 企业地址
        /// </summary>
        [MaxLength(MaxAddressLength)]
        public virtual string Address { get; set; }

        /// <summary>
        /// 企业简介
        /// </summary>
        [MaxLength(MaxIntroductionLength)]
        public virtual string Introduction { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public virtual bool IsActive { get; set; }

        /// <summary>
        /// 删除
        /// </summary>
        public virtual bool IsDeleted { get; set; }
    }
}
